﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ZWZ.Web.Codes.UC.Base
{
    public abstract class ControlList<T> : TitleControl
    {
        #region 默认值
        private int _pagesize = 5;
        private int _pageindex = 1;
        private bool _showPager = true;
        private bool _showemptyrow = true;
        #endregion

        public IEnumerable<T> DataSource { get; set; }
        public int PageIndex { get { return _pageindex; } set { _pageindex = value; } }

        #region 属性
        [ControlAttr.ControlProperty(enum_AttrType.Number, enum_AttrGroup.高级属性, "数据条数")]
        public int PageSize { get { return _pagesize; } set { _pagesize = value; } }

        [ControlAttr.ControlProperty(enum_AttrType.Bool, enum_AttrGroup.基本属性, "显示分页")]
        public bool ShowPager { get { return _showPager; } set { _showPager = value; } }

        [ControlAttr.ControlProperty(enum_AttrType.Bool, enum_AttrGroup.基本属性, "显示空行")]
        public bool ShowEmptyRow { get { return _showemptyrow; } set { _showemptyrow = value; } }
        #endregion
    }
}
